home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 14 / CU Amiga Magazine's Super CD-ROM 14 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-09].iso / CUCD / Programming / Blitz2 / BlitzFaq / FaqLists / Patternmatching.txt < prev    next >
Encoding:
Text File  |  1996-09-05  |  635 b   |  23 lines

  1. Dim textarray$(5)
  2. textarray$(0)="Hiya Roger!"
  3. textarray$(1)="Simon makes SCDs"
  4. textarray$(2)="Amiga makes it happen"
  5. textarray$(3)="This is getting"
  6. textarray$(4)="to be a long"
  7. textarray$(5)="list of words."
  8.  
  9. MaxLen patternbuf$ = 256 ; Must be a minimum of three times the size of
  10.                          ; the pattern$ plus a few.
  11.  
  12. pattern$=Edit$(20)       ; enter text and standard AmigaDOS patterns
  13.  
  14. If ParsePatternNoCase_(&pattern$,&patternbuf$,256)
  15.   For i = 0 To 5
  16.     If MatchPatternNoCase_(&patternbuf$,&textarray$(i))
  17.       NPrint "I matched: "+textarray$(i)
  18.     EndIf
  19.   Next
  20. Else
  21.   NPrint "No ParsePatternNoCase !!!"
  22. EndIf
  23.